package com.yowasa.xiuxian.engine.travel.adventure;

import com.google.common.collect.Sets;
import com.yowasa.xiuxian.engine.travel.AdventureInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.enums.MapEnum;
import com.yowasa.xiuxian.service.helper.UserHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Set;

@Component
public class TianDiDaShi implements AdventureInterface {

    @Autowired
    private UserHelper userHelper;

    @Override
    public Set<MapEnum> limitMaps() {
        return Sets.newHashSet(MapEnum.JUE_YUN_JIAN,MapEnum.PU_GONG_YING_HAI);
    }


    @Override
    public String exec(UserBO user) {
        userHelper.lockUser(user,20,user.getName()+"正在秘境探索中");
        user.getUserBattle().setChp(0);
        return "你误入一处奇特的地方，此处一草一木暗合天地大势，竟然隐隐形成了一种神奇的阵法，你鼓动全身力量与其对抗却被狠狠压制，重伤垂死。";
    }


    public boolean isConflict() {
        return true;
    }

    public int weight() {
        return 4;
    }

}